<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- Copyright 2007 Metaweb Technologies, Inc.  All Rights Reserved. -->
     
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"
      xmlns:freebase="http://freebase.com/">
<head>	
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"></meta>
  <link type="text/css" rel="stylesheet" href="../dist/css/freebase-controls.css" />
  <script type="text/javascript" src="http://code.jquery.com/jquery-latest.js"></script>
  <script type="text/javascript" src="../dist/freebase.suggest.js"></script> 

  <link type="text/css" rel="stylesheet" href="http://mqlx.com/~willmoffat/libs/freebase-minitopic/jquery.freebase.minitopic.css" />
  <script type="text/javascript" src="http://mqlx.com/~willmoffat/libs/freebase-minitopic/jquery.freebase.minitopic.js"></script> 
  
  <title>Freebase Suggest Example with MiniTopic</title>

  <style type="text/css"> 
  .fbs-li-types { display:none; }   /* we hide the type info since we know that all the items will be people */
 </style>
</head>
	 
<body>

<h1>Freebase Suggest example with MiniTopic</h1>
	     
<h3>People - with callback</h3>
Enter a person: <input type="text" id="example1" />

<div id="miniTopic" style="display:none">miniTopic</div>

<script type="text/javascript">
jQuery(function($) {

   $("#example1")
      .freebaseSuggest( {ac_param:{type:'/people/person'}} )
      .bind("fb-select", function(e, data) { 
         $('#miniTopic').show().freebaseMiniTopic(data.id);
    });

});

</script>

</body>
</html>


